<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fun"%>
<html>
<head>
    <title>申请</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    
    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <!-- jqgrid-->
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/custom.ui.jqgrid.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/layer/skin/layer.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/style.css" rel="stylesheet">

    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery.form.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/common.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/i18n/grid.locale-cn.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/minified/jquery.jqGrid.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/layer/layer.js" type="text/javascript"></script>
 	<script src="${pageContext.request.contextPath}/static/js/global.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/plugins/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        .main h5 a {
            position: absolute;
            right: 20px;
            font-size: 14px;
            bottom: 0px;
            display: inline-block;
            padding: 5px;
        }

        .table_list tbody tr {
            height: 35px;
            text-align: center;
        }
        .tab{
        	border: solid #DDDDDD;
    		border-width: 1px 1px 1px 1px;
   			width: 100%;
    		margin-top: 10px !important;
        }
    </style>
</head>
<body>
<div class="col-sm-12">
   <div class="jqGrid_wrapper">
   <h1>${cname }</h1>
   	<table class="table table-bordered">
   		<tr>
   			<th>
   			<input type="checkbox" value="" id='checkall' onclick="checkall(this)" >
   			</th>
   			<th>
   				小区
   			</th>
   			<th>
   				支付宝账号
   			</th>
   		</tr>
   		<c:forEach var="item" items="${datalist}" varStatus="status">
   		<tr>
   			<td  onclick="checkthis(this)">
   			<input type="checkbox" value="${item.sid}" name="communityid" cname="${item.communityname }">				
   			</td>
   			<td>
   			${item.communityname }
   			</td>
   			<td>
   			<select name="aplipay"  class='form-control col-md-1' id="alipay_${item.sid}">
   				<option value="">-请选择账号-</option>
   				<c:forEach var="bean" items="${aliList}" varStatus="status">
   				<option value="${bean.sid }"  >${bean.loginAccount}</option>
   				</c:forEach>
    		</select>
   			</td>
   		</tr>
   		</c:forEach>
   		
   	</table>
       <input type="hidden" name="sid" value="${sid }" id="sid">
    </div>
</div>
<script type="text/javascript">
;(function(window, undefined){
	
			
		
		 
});

function checkall(obj){
	
	$("input[name='communityid']:checkbox").each(function(){
        $(this).prop("checked", $(obj).prop("checked"));
    });
}

function checkthis(obj){
	$(obj).contents().find("input[name='communityid']:checkbox").each(function(){
        $(this).prop("checked", !$(this).prop("checked"));
    });
}
</script>
</body>
</html>
